<%--
  Created by IntelliJ IDEA.
  User: 舒俊容
  Date: 2023/12/19
  Time: 11:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <link rel="stylesheet" href="css/login.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<header class="header container">
    <div class="logo1"><h1>校园论坛</h1></div>
</header>
<div class="container1">
    <h2 style="margin-bottom: 20px;">用户登录</h2>
    <hr style="margin-top: 10px;margin-bottom: 20px;">
    <form action="LoginServlet" method="post">
        <div class="form-group">
            <label for="account"><span style="color: red;">*</span>用户名:</label>
            <input type="text" id="account" name="account" placeholder="请输入用户名" required>
        </div>
        <div class="form-group">
            <label for="password"><span style="color: red;">*</span>密码:</label>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>
        </div>
        <div>
            <%
                String error = (String) request.getAttribute("error");
                if (error != null) {%>
            <p class="alert-danger"><%=error%></p>
            <%}%>
        </div>

        <div class="form-group">
            <button type="submit">登录</button>
        </div>
    </form>
    <hr>
    <p>还没有账号？<a href="regists.jsp">点击这里注册</a></p>
    <p>管理员登陆  <a href="/admin/login.jsp">点击这里登录</a></p>
</div>
</body>
</html>

